#include "stdafx.h"
#include "XamlContext.h"


HRESULT XamlContext::AddNamespacePrefix(const xshared_ptr<CXString> & inPrefix, const xshared_ptr<XamlNamespace> & spXamlNamespace)
{

	return S_OK;

}

HRESULT XamlContext::FindNamespaceByPrefix(const xshared_ptr<CXString> & inPrefix, xshared_ptr<XamlNamespace> & outNamespace)
{

	return S_OK;

}

HRESULT XamlContext::get_SchemaContext(xshared_ptr<XamlSchemaContext> & outSchemaContext)
{
	return this->m_SchemaContext.lock(outSchemaContext);
}

HRESULT XamlContext::GetErrorService(xshared_ptr<ParserErrorReporter> & outErrorService)
{
	HRESULT hr = S_OK;

	xshared_ptr<XamlSchemaContext> schemaContext;

	XASSERT_SUCCESSED(get_SchemaContext(schemaContext));
	XASSERT_SUCCESSED(schemaContext->GetErrorService(outErrorService));

	return hr;

}

HRESULT XamlContext::GetXamlType(const xshared_ptr<CXString> & inPrefix, const xshared_ptr<CXString> & inName, xshared_ptr<XamlNamespace> & outXamlNamespace, xshared_ptr<XamlType> & outXamlType)
{

	HRESULT hr = S_OK;

	XASSERT_SUCCESSED(FindNamespaceByPrefix(inPrefix, outXamlNamespace));

	XASSERT_SUCCESSED(outXamlNamespace->GetXamlType(inName, outXamlType));


	return hr;

}

HRESULT XamlContext::GetXamlType(const xshared_ptr<XamlName> & inTypeName, xshared_ptr<XamlNamespace> & outXamlNamespace, xshared_ptr<XamlType> & outXamlType)
{
	return GetXamlType(inTypeName->get_Prefix(),inTypeName->get_Name(),outXamlNamespace,outXamlType);
}

HRESULT XamlContext::GetXamlType(const xshared_ptr<XamlName> & inTypeName, xshared_ptr<XamlType> & outXamlType)
{
	HRESULT hr = S_OK;

	xshared_ptr<XamlNamespace> xamlNamespace;

	XASSERT_SUCCESSED(GetXamlType(inTypeName, xamlNamespace, outXamlType));

	return hr;

}

HRESULT XamlContext::GetXamlProperty(const xshared_ptr<XamlType> & inXamlType, const xshared_ptr<CXString> & inPropertyName, xshared_ptr<XamlProperty> & outXamlProperty)
{

	return inXamlType->GetProperty(inPropertyName,outXamlProperty);

}

HRESULT XamlContext::GetXamlAttachableProperty(const xshared_ptr<XamlType> & inXamlType, const xshared_ptr<CXString> & inPropertyName, xshared_ptr<XamlProperty> & outXamlProperty)
{
	return inXamlType->GetAttachableProperty(inPropertyName,outXamlProperty);
}

XamlContext::XamlContext(const xshared_ptr<XamlSchemaContext> & inSchemaContext)
{

	this->m_SchemaContext = inSchemaContext;

}

XamlContext::~XamlContext()
{

	NOTIMPL

}

HRESULT XamlContext::PopulateDefaultNamespaces()
{

	NOTIMPL

}
